package com.msh.bird;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;

/**
 * Date：2021年09月
 * Author：程Sir
 * Content: 地面信息类
 */
public class Ground extends Global{

    public Ground() throws Exception {
        image = ImageIO.read(getClass().getResource("img/ground.png"));
        width = image.getWidth();
        height = image.getHeight();
        x = 0;
        y = 500;
    }

    /**
     * 地面对象移动的方法
     */
    public void step() {
        x--;
        if (x == -109) {
            x = 0;
        }
    }
}
